cmake_minimum_required(VERSION 3.0)
project(libeventDemo CXX)

set(CMAKE_CXX_FLAGS "$ENV{CXXFLAGS} -rdynamic -O3 -fPIC -ggdb -std=c++11 -Wall -Wno-deprecated -Werror -Wno-unused-function -Wno-builtin-macro-redefined -Wno-deprecated-declarations -Wno-unused-result")
set(CMAKE_C_FLAGS "$ENV{CXXFLAGS} -rdynamic -O3 -fPIC -ggdb -std=c11 -Wall -Wno-deprecated -Werror -Wno-unused-function -Wno-builtin-macro-redefined -Wno-deprecated-declarations -Wno-unused-result")

set(LIBS
        event
        )

add_executable(primary-client primary-client.cpp)
target_link_libraries(primary-client ${LIBS})

add_executable(primary-server primary-server.cpp)
target_link_libraries(primary-server ${LIBS}) 

add_executable(secondary-client secondary-client.cpp)
target_link_libraries(secondary-client ${LIBS})

add_executable(secondary-server secondary-server.cpp)
target_link_libraries(secondary-server ${LIBS})

add_executable(higher-client higher-client.cpp)
target_link_libraries(higher-client ${LIBS})

add_executable(higher-server higher-server.cpp)
target_link_libraries(higher-server ${LIBS})

SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)
SET(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/lib)

